/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package amanda_gabriel_isabella_lucivania_monica.View;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * Primary Keu do Professor na Turma
 *
 * @author gabriel
 */
@Embeddable
public class ProfessorTurmaPK implements Serializable {

    @Basic(optional = false)
    @Column(name = "professor_id")
    private int professorId;
    @Basic(optional = false)
    @Column(name = "turma_id")
    private int turmaId;

    public ProfessorTurmaPK() {
    }

    public ProfessorTurmaPK(int professorId, int turmaId) {
        this.professorId = professorId;
        this.turmaId = turmaId;
    }

    public int getProfessorId() {
        return professorId;
    }

    public void setProfessorId(int professorId) {
        this.professorId = professorId;
    }

    public int getTurmaId() {
        return turmaId;
    }

    public void setTurmaId(int turmaId) {
        this.turmaId = turmaId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) professorId;
        hash += (int) turmaId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ProfessorTurmaPK)) {
            return false;
        }
        ProfessorTurmaPK other = (ProfessorTurmaPK) object;
        if (this.professorId != other.professorId) {
            return false;
        }
        if (this.turmaId != other.turmaId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "amanda_gabriel_isabella_lucivania_monica.View.ProfessorTurmaPK[ professorId=" + professorId + ", turmaId=" + turmaId + " ]";
    }
}
